/*
 * Filename:    AuditProblemDao.java
 * Copyright:   2014 中国平安保险（集团）股份有限公司 版权所有
 * Company:     平安科技养老险及健康险系统开发部
 * Create at:   2014-11-15
 */
package com.paic.mhis.hcpms.audit.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.paic.mhis.hcpms.audit.dto.AuditProblemDTO;
import com.paic.mhis.hcpms.audit.dto.AuditProblemsDTO;
import com.paic.mhis.hcpms.audit.dto.QueryProblemDTOParameter;
import com.paic.pafa.biz.dao.BaseDAO;

/**
 * 对事件表的处理的dao
 * 
 * @author EX-WANGKUI001
 * 
 */
@Component("auditProblemDao")
public class AuditProblemDao extends BaseDAO {

	public List<AuditProblemDTO> queryAuditProblemBeanList(
			QueryProblemDTOParameter parameter) {

		List<AuditProblemDTO> list = (List<AuditProblemDTO>) this
				._queryForList("auditProblemsDao.queryAuditProblemBean",
						parameter);

		return list;

	}

	public long queryAuditProblemBeanCount(QueryProblemDTOParameter parameter) {

		long count = this._queryForCount(
				"auditProblemsDao.queryAuditProblemBeanCount", parameter);
		return count;
	}

	public void updateAuditProblem(AuditProblemsDTO problem) {
		this._update("auditProblemsDao.updateAuditProblems", problem);
	}

	/**
	 * 获取事件对象
	 * @return
	 */
	public Map<String, Object> queryAuditProblems(String problemCode) {

		return (HashMap<String, Object>) this._getObject(
				"auditProblemsDao.queryProblems", problemCode);

	}

}
